package org.zhaijisong.pojo;

public class User {
    private Integer id;
    private String name;
    private String user;
    private String password;
    private String salt;
    private Integer protrait;
    private String phone;
    private Integer addressId;

    private Images images;

    public Images getImages() {
        return images;
    }

    public void setImages(Images images) {
        this.images = images;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public Integer getProtrait() {
        return protrait;
    }

    public void setProtrait(Integer protrait) {
        this.protrait = protrait;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Integer getAddressId() {
        return addressId;
    }

    public void setAddressId(Integer addressId) {
        this.addressId = addressId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        User user1 = (User) o;

        if (id != null ? !id.equals(user1.id) : user1.id != null) return false;
        if (name != null ? !name.equals(user1.name) : user1.name != null) return false;
        if (user != null ? !user.equals(user1.user) : user1.user != null) return false;
        if (password != null ? !password.equals(user1.password) : user1.password != null) return false;
        if (salt != null ? !salt.equals(user1.salt) : user1.salt != null) return false;
        if (protrait != null ? !protrait.equals(user1.protrait) : user1.protrait != null) return false;
        if (phone != null ? !phone.equals(user1.phone) : user1.phone != null) return false;
        if (addressId != null ? !addressId.equals(user1.addressId) : user1.addressId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (user != null ? user.hashCode() : 0);
        result = 31 * result + (password != null ? password.hashCode() : 0);
        result = 31 * result + (salt != null ? salt.hashCode() : 0);
        result = 31 * result + (protrait != null ? protrait.hashCode() : 0);
        result = 31 * result + (phone != null ? phone.hashCode() : 0);
        result = 31 * result + (addressId != null ? addressId.hashCode() : 0);
        return result;
    }
}
